package psn.kiko.mapper.business.associated;

import org.apache.ibatis.annotations.Mapper;
import psn.kiko.pojo.entity.system.OperationInterfaceEntity;
import psn.kiko.pojo.vo.PureInterfaceVO;

import java.util.List;

/**
 *操作-接口DAO
 */
@Mapper
public interface OperationInterfaceMapper{
	/**
	 * 批量插入
	 * */
	Integer insertBatch(List<OperationInterfaceEntity> operationInterfaceEntities);
	
	/**
	 * 删除指定操作关联的接口，interfaceStableIds为null或interfaceStableIds无有效元素，则删除操作关联的所有接口
	 * @param operationId 操作id
	 * @param interfaceStableIds 接口stableId集合
	 */
	Integer deleteBatch(Integer operationId,List<Integer> interfaceStableIds);
	
	/**
	 * 根据操作id批量删除
	 * */
	Integer deleteBatchByOperationId(List<Integer> operationIds);
	
	/**
	 * 获取操作关联的接口
	 * */
	List<PureInterfaceVO> selectInterfacesByOperationId(Integer operationId);
	
	Integer deleteByInterfaceId(List<Integer> apiStableIds);
}
